package src
{
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	public class Button extends MovieClip
	{
		public function Button()
		{	
			stop();
			this.mouseChildren = false;
			addEventListener(MouseEvent.ROLL_OVER,onHover);
			addEventListener(MouseEvent.ROLL_OUT,outHover);
			addEventListener(MouseEvent.MOUSE_DOWN, onPush);
		}
		
		private function onHover(e:MouseEvent):void
		{
			gotoAndStop("hover");
		}
		private function outHover(e:MouseEvent):void
		{
			gotoAndStop("normal");
		}
		private function onPush(e:MouseEvent):void
		{
			gotoAndStop("pressed");
		}
	}
}